#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>

typedef int DataType;
typedef struct Heap {
	DataType* arr;
	int capacity;
	int size;
}Heap;

void Swap(DataType* e1, DataType* e2);
void AdjustDown(DataType* arr, int size, int parent);
void AdjustUp(DataType* arr, int child);
void HeapPrint(Heap* hp);
void HeapInit(Heap* hp);
void HeapDestroy(Heap* hp);
void HeapPush(Heap* hp,DataType x);
void HeapPop(Heap* hp);
DataType HeapTop(Heap* hp);
bool HeapEMpty(Heap* hp);
int HeapSize(Heap* hp);